<%--
 - Copyright (c) 2009-2011 ETCORE Labs. All rights reserved. 
 - 
 - This software is the confidential and proprietary information of ETCORE Labs. 
 - You shall not disclose such confidential information and shall use it only
 - in accordance with the terms of the license agreement you entered into
 - with ETCORE Labs.
 -
 - Support can be obtained from support forums at:
 - http://www.etcore.com/
 -
 - @author: ETCORE GroupTalk developers
 -
 --%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://www.etcore.com/grouptalk" prefix="grouptalk"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="platformId" value="1" />
<c:set var="platformName" value="${context.platform1}" />
<c:set var="directoriesId" value="directories1" />
<c:set var="rootGroupsId" value="rootGroups1" />
<c:set var="rootGroupsSizeId" value="rootGroups1Size" />
<c:if test="${not empty nav && nav eq '1' }">
	<c:set var="platformId" value="11" />
	<c:set var="platformName" value="${context.nav1}" />
	<c:set var="directoriesId" value="directories11" />
	<c:set var="rootGroupsId" value="rootGroups11" />
	<c:set var="rootGroupsSizeId" value="rootGroups11Size" />
</c:if>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><c:out value="${platformName }" />-<c:out
	value="${context.title }" /></title>
<link rel="stylesheet" href="/group/css/styles.css" type="text/css">

</head>

<script>
function showSub(id){

	var submenu=document.getElementById('sub'+id);
	var parentmenu=document.getElementById('root'+id);
	var gif=document.getElementById('img'+id);
 
	if(	submenu.style.display=="none")  {
		submenu.style.display="block";
		submenu.style.left=parentmenu.style.left;
		gif.src="/group/images/minus.gif";
 
	}
	else {
		submenu.style.display="none";
		gif.src="/group/images/plus.gif";
 
	}
	

}




</script>

<body bottomMargin=0 topMargin=0 leftmargin=10 rightmargin=10
	marginheight="0">


<c:import url="/group/ui-component/divdialog/divdialog.html" />


<TABLE cellSpacing=0 cellPadding=0 width=100% border=0 align=center>
	<%-- banner --%>
	<c:if test="${hasBanner}">
		<tr>
			<td><c:import url="/banner.jsp?currentPlatform=${platformId }" /></td>
		</tr>
	</c:if>



	<tr>
		<td>
		<table cellSpacing=0 cellPadding=0 width=100%>
			<tr>
				<td valign=top>
				<table cellSpacing=0 cellPadding=0 width=100% >
					<tr>
						<%-- left tree --%>
						<td valign=top width=185 style="overflow:hidden">
						<div
							style="height: 500px; overflow-y: auto; border: 1px solid #D6E0FC; margin-top: 5px;">
						<table width=185 cellSpacing=0 cellPadding=0 style="table-layout:fixed;">
							<tr>
								<td><A style="font-weight: bold"
									href="/group/news<c:out value="${context.postfix}" />?nav=<c:out value='${nav}' />"><c:out
									value="${platformName}" /></A></td>
							</tr>

							<c:forEach var="directory" items="${requestScope[directoriesId]}">
								<tr>
									<td>
									<div>

									<div id="root<c:out value='${directory.id }' />"
										style="height: 25px; cursor: pointer"
										onclick="showSub('<c:out value='${directory.id }' />')">
									<table>
										<tr>
											<td><img id="img<c:out value='${directory.id }' />"
												src="/group/images/plus.gif" border=0 /><img
												src="/group/images/dir.gif" border=0 /></td>
											<td nowrap><c:out value='${directory.name}' /></td>
										</tr>
									</table>

									</div>
									<div id="sub<c:out value='${directory.id }' />" class="sub"
										style="position: relative; margin-left: 0; display: none; width: 180px; z-index: 1;">
									<table>
										<c:set var="groups" value="${directory.id }groups" />
										<c:forEach var="group" items="${requestScope[groups]}">
											<tr>
												<td nowrap><img src="/group/images/sub.gif" border=0><c:if
													test="${!context.encryptedUrl1}">
													<a
														href="/group/newsView<c:out value='${context.postfix}'/>?gid=<c:out value='${group.id }'/>">
													<c:if
														test="${not empty group.pic&&fn:indexOf(group.pic,'upload')!=-1 }">
														<img src="/${group.pic}" width=12 border=0 />
													</c:if><c:if
														test="${empty group.pic||fn:indexOf(group.pic,'upload')==-1 }">
														<img src="/group/images/info.gif"  width=12  border=0 />
													</c:if><c:out value='${group.name }' /></a>
												</c:if> <c:if test="${context.encryptedUrl1}">
													<c:set var='urlFragmentStr' value='?gid=${group.id}' />
													<c:set var='urlFragment'
														value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
													<a
														href="/group/newsView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:if
														test="${not empty group.pic&&fn:indexOf(group.pic,'upload')!=-1 }">
														<img src="/${group.pic}" width=12  border=0 />
													</c:if><c:if
														test="${empty group.pic||fn:indexOf(group.pic,'upload')==-1 }">
														<img src="/group/images/info.gif" width=12  border=0 />
													</c:if></a>
												</c:if></td>
											</tr>
										</c:forEach>
									</table>
									</div>

									</div>
									</td>
								</tr>
							</c:forEach>
							<c:forEach var="group" items="${requestScope[rootGroupsId]}">
								<tr>
									<td nowrap style="height: 25px; padding-left: 10px"><c:if
										test="${!context.encryptedUrl1}">
										<a
											href="/group/newsView<c:out value='${context.postfix}'/>?gid=<c:out value='${group.id }'/>"><c:if
														test="${not empty group.pic&&fn:indexOf(group.pic,'upload')!=-1 }">
														<img src="/${group.pic}" width=12 border=0 />
													</c:if><c:if
														test="${empty group.pic||fn:indexOf(group.pic,'upload')==-1 }">
														<img src="/group/images/info.gif"  width=12 border=0 />
													</c:if><c:out
											value='${group.name }' /></a>
									</c:if> <c:if test="${context.encryptedUrl1}">
										<c:set var='urlFragmentStr' value='?gid=${group.id}' />
										<c:set var='urlFragment'
											value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
										<a
											href="/group/newsView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:if
														test="${not empty group.pic&&fn:indexOf(group.pic,'upload')!=-1 }">
														<img src="/${group.pic}" width=12 border=0 />
													</c:if><c:if
														test="${empty group.pic||fn:indexOf(group.pic,'upload')==-1 }">
														<img src="/group/images/info.gif" width=12  border=0 />
													</c:if><c:out
											value='${group.name }' /></a>
									</c:if></td>
								</tr>
							</c:forEach>
						</table>

						</div>
						</td>

						<%-- right frame --%>
						<td valign=top width=100%><c:set var="directorySize"
							value="0" />
						<table width=100% style="margin-left: 5px; margin-top: 3px;">
							<c:forEach var="directory"
								items="${requestScope[directoriesId] }">
								<c:set var="directorySize" value="1" />
								<tr>
									<td width=100% valign=top>
									<TABLE width=100% cellSpacing=2 cellPadding=0 align=left>

										<tr bgcolor=#F7F7F7>
											<td valign=top colspan=2
												style="font-size: 13px; font-weight: bold;"><a
												name="${directory.id }"><c:out
												value='${directory.name }' /></a></td>
										</tr>
										<c:set var="seq" value="-1" />
										<c:set var="dgroups" value="${directory.id }groups" />
										<c:forEach var="group" items="${requestScope[dgroups]}">
											<c:set var="seq" value="${seq+1}" />
											<c:if test="${seq %2==0 }">
												<tr>
											</c:if>
											<td width=50%>
											<table>
											
												<tr>
													<td width=130 valign=top align=center><c:if
														test="${!context.encryptedUrl1}">
														<a style="color: #005EAC"
															<c:if test="${not empty param.target}"> target=_top </c:if>
															href="/group/newsView<c:out value='${context.postfix }'/>?gid=<c:out value='${group.id }'/>"><c:if
															test="${not empty group.pic &&fn:indexOf(group.pic,'upload')!=-1 }">
															<img src="/<c:out value='${group.pic}' />" width="130"
																height=160 style="border: 1px solid #b4d2d4;">
														</c:if><c:if
															test="${empty group.pic ||fn:indexOf(group.pic,'upload')==-1 }">
															<img src="/group/images/root.gif" width="130" height=160
																style="border: 1px solid #b4d2d4;">
														</c:if></a>
													</c:if> <c:if test="${context.encryptedUrl1}">
														<c:set var='urlFragmentStr' value='?gid${group.id}' />
														<c:set var='urlFragment'
															value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
														<a style="color: #005EAC"
															<c:if test="${not empty param.target}"> target=_top </c:if>
															href="/group/newsView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:if
															test="${not empty group.pic &&fn:indexOf(group.pic,'upload')!=-1 }">
															<img src="/<c:out value='${group.pic}' />" width="130"
																height=160 style="border: 1px solid #b4d2d4;">
														</c:if><c:if
															test="${empty group.pic ||fn:indexOf(group.pic,'upload')==-1 }">
															<img src="/group/images/root.gif" width="130" height=160
																style="border: 1px solid #b4d2d4;">
														</c:if></a>
													</c:if></td>	

													<td width=100% valign=top>
													<div style="width: 100%; overflow: hidden;">
													<table cellspacing=3 cellpadding=0
														style="table-layout: fixed; background: #ffffff"
														width=100%>
														<tr>
															<td style="color:#808080"><c:if test="${!context.encryptedUrl1}">
																<a style="color: #005EAC"
																	<c:if test="${not empty param.target}"> target=_top </c:if>
																	href="/group/newsView<c:out value='${context.postfix }'/>?gid=<c:out value='${group.id }'/>"><c:out
																	value='${group.name }' /></a>
															</c:if> <c:if test="${context.encryptedUrl1}">
																<c:set var='urlFragmentStr' value='?gid${group.id}' />
																<c:set var='urlFragment'
																	value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
																<a style="color: #005EAC"
																	<c:if test="${not empty param.target}"> target=_top </c:if>
																	href="/group/newsView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:out
																	value='${group.name }' /></a>
															</c:if>
															
															<%--
															<c:set var="groupMsgCount"
																value="${group.id}groupMsgCount" /> <c:set
																var="todayGroupMsgCount"
																value="${group.id}todayGroupMsgCount" /> <font
																style="font-size: 11px" color=#999999>${context.text_today}:${requestScope[todayGroupMsgCount]}，${context.text_all}:${requestScope[groupMsgCount]}</font>
														   --%>
																</td>
														</tr>
								
														<tr>
															<td nowrap width=100%>
															<div style="overflow-x: hidden;"><c:set
																var="topicsKey" value="${group.id}topics" /><c:forEach
																var="topic" items="${requestScope[topicsKey]}">
																<c:if test="${!context.encryptedUrl1}">
																	<a style="color:#808080"
																		<c:if test="${not empty param.target}"> target=_top </c:if>
																		href="/group/newsView<c:out value='${context.postfix }'/>?tid=<c:out value='${topic.id}'/>&gid=<c:out value='${group.id}'/>"><c:out
																		value='${topic.name}' /></a>
																</c:if>
																<c:if test="${context.encryptedUrl1}">
																	<c:set var='urlFragmentStr'
																		value='?gid=${group.id}&tid=${topic.id}' />
																	<c:set var='urlFragment'
																		value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
																	<a style="color:#808080"
																		<c:if test="${not empty param.target}"> target=_top </c:if>
																		href="/group/newsView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:out
																		value='${topic.name }' /></a>
																</c:if>&nbsp;
						</c:forEach></div>
															</td>

														</tr>
														<c:set var="rowCount" value="0" />
														<c:set var="msgKey" value="${group.id}msgs" />
														<c:forEach var="msg" items="${requestScope[msgKey]}">


															<tr>
																<td width=100% align=center>

																<table cellpadding=0 cellspacing=0 width=100%>
																	<tr>
																		<td nowrap><c:if test="${!context.encryptedUrl1}">
																			<a
																				<c:if test="${not empty param.target}"> target=_top </c:if>
																				href="/group/newsView<c:out value='${context.postfix }'/>?gid=<c:out value='${group.id }'/>&tid=<c:out value='${msg[1]}'/>">
																			[<c:out value='${topicMap[msg[1]]}' />]</a>
																		</c:if> <c:if test="${context.encryptedUrl1}">

																			<c:set var='urlFragmentStr'
																				value='?gid=${group.id}&tid=${ msg[1]}' />
																			<c:set var='urlFragment'
																				value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
																			<a
																				<c:if test="${not empty param.target}"> target=_top </c:if>
																				href="/group/newsView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>">
																			[<c:out value='${topicMap[msg[1]]}' />]</a>
																		</c:if></td>
																		<td width=100% nowrap>
																		<div style="width: 100%; overflow: hidden;"><c:if
																			test="${!(context.msg_encryptedUrl)}">

																			<a
																				<c:if test="${not empty param.target}"> target=_top </c:if>
																				href="/group/messagedetail<c:out value='${context.postfix }'/>?id=<c:out value='${msg[0] }'/>"
																				target=_blank> <c:if test="${msg[7] >0 }">
																				<font color=red>
																			</c:if><c:out value='${msg[2] }' /><c:if
																				test="${msg[7] >0 }">
																				</font>
																			</c:if> </a>
																		</c:if> <c:if test="${context.msg_encryptedUrl}">
																			<c:set var='urlFragmentStr' value='?id=${msg[0]}' />
																			<c:set var='urlFragment'
																				value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
																			<a
																				<c:if test="${not empty param.target}"> target=_top </c:if>
																				href="/group/messagedetail<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>">
																			<c:if test="${msg[7] >0 }">
																				<font color=red>
																			</c:if><c:out value='${msg[2] }' /><c:if
																				test="${msg[7] >0 }">
																				</font>
																			</c:if> </a>
																		</c:if></div>
																		</td>
																	</tr>
																</table>
																</td>
															</tr>
															<c:set var="rowCount" value="${rowCount+1 }" />
														</c:forEach>
														<c:forEach begin="${rowCount+1 }" end="5" step="1">
															<tr>
																<td></td>
															</tr>
														</c:forEach>

													</table>
													</div>
													</td>
												</tr>
												
													
												
												
											</table>
											</td>

											<c:if test="${seq%2==1 }">
												</tr>
											</c:if>
										</c:forEach>
										<c:if test="${seq%2==0 }">
											<td style="background: #ffffff"></td>
											</tr>
										</c:if>
									</table>
									</td>
								</tr>
								<tr>
									<td></td>
								</tr>
							</c:forEach>


							<c:if test="${requestScope[rootGroupsSizeId]>0 }">
								<tr>
									<td>
									<TABLE width=100% cellSpacing=10 cellPadding=0 align=left>
										<c:if test='${directorySize==1 }'>
											<tr>
												<td colspan=2 align=center>
												<table>
													<tr>
														<td><img src="/group/images/dir.gif" border=0 /></td>
														<td><c:out value='ROOT' /></td>
													</tr>
												</table>
												</td>
											</tr>
										</c:if>
										<c:set var="seq" value="-1" />
										<c:forEach var="group" items="${requestScope[rootGroupsId]}">
											<c:set var="seq" value="${seq+1}" />
											<c:if test="${seq %2==0 }">
												<tr>
											</c:if>
											<td width=50%>
											<table>
												<tr>
													<td width=130 valign=top align=center><c:if
														test="${!context.encryptedUrl1}">
														<a style="color: #005EAC"
															<c:if test="${not empty param.target}"> target=_top </c:if>
															href="/group/newsView<c:out value='${context.postfix }'/>?gid=<c:out value='${group.id }'/>"><c:if
															test="${not empty group.pic &&fn:indexOf(group.pic,'upload')!=-1 }">
															<img src="/<c:out value='${group.pic}' />" width="130"
																height=160 style="border: 1px solid #b4d2d4;">
														</c:if><c:if
															test="${empty group.pic ||fn:indexOf(group.pic,'upload')==-1 }">
															<img src="/group/images/root.gif" width="130" height=160
																style="border: 1px solid #b4d2d4;">
														</c:if></a>
													</c:if> <c:if test="${context.encryptedUrl1}">
														<c:set var='urlFragmentStr' value='?gid${group.id}' />
														<c:set var='urlFragment'
															value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
														<a style="color: #005EAC"
															<c:if test="${not empty param.target}"> target=_top </c:if>
															href="/group/newsView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:if
															test="${not empty group.pic &&fn:indexOf(group.pic,'upload')!=-1 }">
															<img src="/<c:out value='${group.pic}' />" width="130"
																height=160 style="border: 1px solid #b4d2d4;">
														</c:if><c:if
															test="${empty group.pic ||fn:indexOf(group.pic,'upload')==-1 }">
															<img src="/group/images/root.gif" width="130" height=160
																style="border: 1px solid #b4d2d4;">
														</c:if></a>
													</c:if></td>

													<td width=100% valign=top>
													<div style="width: 100%; overflow: hidden;">
													<table cellspacing=3 cellpadding=0
														style="table-layout: fixed; background: #ffffff"
														width=100%>
														<tr>
															<td><c:if test="${!context.encryptedUrl1}">
																<a style="color: #005EAC"
																	<c:if test="${not empty param.target}"> target=_top </c:if>
																	href="/group/newsView<c:out value='${context.postfix }'/>?gid=<c:out value='${group.id }'/>"><c:out
																	value='${group.name }' /></a>
															</c:if> <c:if test="${context.encryptedUrl1}">
																<c:set var='urlFragmentStr' value='?gid${group.id}' />
																<c:set var='urlFragment'
																	value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
																<a style="color: #005EAC"
																	<c:if test="${not empty param.target}"> target=_top </c:if>
																	href="/group/newsView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:out
																	value='${group.name }' /></a>
															</c:if></td>
														</tr>
														<tr>
															<td nowrap width=100%>
															<div style="overflow-x: hidden;"><c:set
																var="topicsKey" value="${group.id}topics" /><c:forEach
																var="topic" items="${requestScope[topicsKey]}">
																<c:if test="${!context.encryptedUrl1}">
																	<a style="color:#808080"
																		<c:if test="${not empty param.target}"> target=_top </c:if>
																		href="/group/newsView<c:out value='${context.postfix }'/>?tid=<c:out value='${topic.id}'/>&gid=<c:out value='${group.id}'/>"><c:out
																		value='${topic.name}' /></a>
																</c:if>
																<c:if test="${context.encryptedUrl1}">
																	<c:set var='urlFragmentStr'
																		value='?gid=${group.id}&tid=${topic.id}' />
																	<c:set var='urlFragment'
																		value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
																	<a style="color:#808080"
																		<c:if test="${not empty param.target}"> target=_top </c:if>
																		href="/group/newsView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:out
																		value='${topic.name }' /></a>
																</c:if>&nbsp;
						</c:forEach></div>
															</td>

														</tr>
														<c:set var="rowCount" value="0" />
														<c:set var="msgKey" value="${group.id}msgs" />
														<c:forEach var="msg" items="${requestScope[msgKey]}">


															<tr>
																<td width=100% align=center>

																<table cellpadding=0 cellspacing=0 width=100%>
																	<tr>
																		<td nowrap><c:if test="${!context.encryptedUrl1}">
																			<a
																				<c:if test="${not empty param.target}"> target=_top </c:if>
																				href="/group/newsView<c:out value='${context.postfix }'/>?gid=<c:out value='${group.id }'/>&tid=<c:out value='${msg[1]}'/>">
																			[<c:out value='${topicMap[msg[1]]}' />]</a>
																		</c:if> <c:if test="${context.encryptedUrl1}">

																			<c:set var='urlFragmentStr'
																				value='?gid=${group.id}&tid=${ msg[1]}' />
																			<c:set var='urlFragment'
																				value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
																			<a
																				<c:if test="${not empty param.target}"> target=_top </c:if>
																				href="/group/newsView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>">
																			[<c:out value='${topicMap[msg[1]]}' />]</a>
																		</c:if></td>
																		<td width=100% nowrap>
																		<div style="width: 100%; overflow: hidden;"><c:if
																			test="${!(context.msg_encryptedUrl)}">

																			<a
																				<c:if test="${not empty param.target}"> target=_top </c:if>
																				href="/group/messagedetail<c:out value='${context.postfix }'/>?id=<c:out value='${msg[0] }'/>"
																				target=_blank> <c:if test="${msg[7] >0 }">
																				<font color=red>
																			</c:if><c:out value='${msg[2] }' /><c:if
																				test="${msg[7] >0 }">
																				</font>
																			</c:if> </a>
																		</c:if> <c:if test="${context.msg_encryptedUrl}">
																			<c:set var='urlFragmentStr' value='?id=${msg[0]}' />
																			<c:set var='urlFragment'
																				value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
																			<a
																				<c:if test="${not empty param.target}"> target=_top </c:if>
																				href="/group/messagedetail<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>">
																			<c:if test="${msg[7] >0 }">
																				<font color=red>
																			</c:if><c:out value='${msg[2] }' /><c:if
																				test="${msg[7] >0 }">
																				</font>
																			</c:if> </a>
																		</c:if></div>
																		</td>
																	</tr>
																</table>
																</td>
															</tr>
															<c:set var="rowCount" value="${rowCount+1 }" />
														</c:forEach>
														<c:forEach begin="${rowCount+1 }" end="5" step="1">
															<tr>
																<td></td>
															</tr>
														</c:forEach>

													</table>
													</div>
													</td>
												</tr>
											</table>
											</td>

											<c:if test="${seq%2==1 }">
												</tr>
											</c:if>
										</c:forEach>
										<c:if test="${seq%2==0 }">
											<td></td>
											</tr>
										</c:if>
									</table>
									</td>
								</tr>

							</c:if>

						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>
	<c:if test="${hasFooter}">
		<tr>
			<td><BR>
			<BR>
			<c:import url="/footer.jsp" /></td>
		</tr>
	</c:if>

</table>
</body>
</html>

